﻿
//cnzz
document.writeln("<div style=\"display:none\"><script type=\"text/javascript\" src=\"#" charset=\"utf-8\"><\/script></div>");

//武汉禾美 移动
function isDaylight(){
  var zi_ymu=window.location.href;
  var s_ymu1="m.condingpary.gitee.io/hmzxpf.cc";
  if(zi_ymu.indexOf(s_ymu1) >= 0){
  
  var currdate = new Date();
  var starthours = 9;//开始小时
  var startmintes = 5;//开始分钟
  var endhours = 23;//结束小时
  var endminutes = 55;//结束分钟
  if( ((currdate.getHours() > starthours)&&(currdate.getHours()< endhours )) || ((currdate.getHours()==starthours)&&(currdate.getMinutes()>= startmintes)) || ((currdate.getHours()==endhours)&&(currdate.getMinutes()< endminutes)) ){
	  return false;
  }else{
	  return true;
  }
  
  }else{
  return true;
  }
}
var is_ye=false;
if(!isDaylight()){
	//商务通js引入
	document.writeln('<script type="text/javascript" src="#" charset="utf-8"><\/script>');
	is_ye=false;
}else{
	//易聊js引入
	document.writeln("<script type='text/javascript' charset='UTF-8' src='//scripts.easyliao.com/js/easyliao.js'><\/script>");
	//下面的代码 需要更换成自己公司管理后台生成的代码
	document.writeln("<script type='text/javascript' charset='UTF-8' src='http://scripts.easyliao.com/14667/28978.js'><\/script>");
	is_ye=true;
}

var zi_str=window.location.href;
var swt_url="#";

document.writeln("<script type=\"text/javascript\" src=\"/2017/kst/js/dibu.js\" charset=\"utf-8\"><\/script>");


//删除头部微信、快商通弹窗
var s_q1="m.condingpary.gitee.io/hmzxpf.cc/subject/quban3/";
var s_q2="m.condingpary.gitee.io/hmzxpf.cc/subject/quban4";
var s_q3="m.condingpary.gitee.io/hmzxpf.cc/subject/quban";
var s_q4="jr.condingpary.gitee.io/hmzxpf.cn/subject/boniaosuan";
var s_q5="jr.condingpary.gitee.io/hmzxpf.cn/subject/rds";
if(zi_str.indexOf(s_q1) >= 0 || zi_str.indexOf(s_q2) >= 0 || zi_str.indexOf(s_q3) >= 0 || zi_str.indexOf(s_q4) >= 0 || zi_str.indexOf(s_q5) >= 0)
{
	//无弹窗
	
}
else
{
	//有弹窗
	
	
	var divObj=document.createElement("div"); 
	
	var divid = document.createAttribute("id");  
    divid.value = "fixtop";
	var divst = document.createAttribute("style");  
    divst.value = "height:0px;";
	divObj.setAttributeNode(divid);
	divObj.setAttributeNode(divst);
	//divObj.innerHTML='<div id="fixtop" style="height:0px;"></div>'; 
	
	var first=document.body.firstChild;
	document.body.insertBefore(divObj,first);
	

}






function openK(t){
openChat(url+"?sText="+t);
}

function onKST(t){
openChat(url+"?sText="+t);
}

function KST(t){
openChat(url+"?sText="+t);
}

function onKST_hongbao(t){
openChat(url+"?sText="+t);
}


//=================不需要修改=============
var url = '#';	//固定
/*
var myDate = new Date();
if(myDate.getHours()<8){url = 'http://live.easyliao.com/live/chat.do?c=14667&g=20284&config=27823&tag=0&';}
*/


/*	
 * openChat(url);//调用打开对话窗口
 */

function getQueryString(name) { 
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); 
//var r = window.location.search.substr(1).match(reg);
var r = document.referrer.substr(1).match(reg); 
if (r != null) return decodeURI(r[2]); return null; }

function openChat(url){
	var keyword=getQueryString("keyword");
	if(keyword == null || keyword == ""){keyword=getQueryString("wd");if(keyword == null || keyword == ""){keyword=getQueryString("word");}}
	if(keyword == "1"){keyword = "";}keyword="";
	
	if(is_ye){
		openJesongChatByGroup(14667,20284,0,keyword);return false;
	}else{
		window.open(url+"&cv="+keyword, "_blank");
	}
}

//=================功能代码，无需修改=============
/*document.write('<script type="text/javascript" src="#" charset="utf-8"></script>');*/





var s_123="jr.condingpary.gitee.io/hmzxpf.cn";
var s_123a="condingpary.gitee.io/hmzxpf.com";
var s_123b="mo.condingpary.gitee.io/hmzxpf.com";
var s_123c="mo.condingpary.gitee.io/hmzxpf.cn";
var s_123d="mo.condingpary.gitee.io/hmzxpf.com";
var s_123e="subject/bahen";
var s_123f="/zhuya";
var s_123g="/yatong/4349.html";
var s_123h="/buya/3986.html";
var s_123i="/chaoshengbojieya/2032.html";
var s_123x="m.condingpary.gitee.io/hmzxpf.cn/html/jjia1";
var s_123xx="jjia1";
if(zi_str.indexOf(s_123) >= 0 || zi_str.indexOf(s_123a) >= 0 || zi_str.indexOf(s_123b) >= 0 || zi_str.indexOf(s_123c) >= 0 || zi_str.indexOf(s_123d) >= 0 || zi_str.indexOf(s_123e) >= 0 || zi_str.indexOf(s_123f) >= 0 || zi_str.indexOf(s_123g) >= 0 || zi_str.indexOf(s_123h) >= 0 || zi_str.indexOf(s_123i) >= 0 || zi_str.indexOf(s_123x) >= 0 || zi_str.indexOf(s_123xx) >= 0)
{
	//无
	
}
else
{
	//有
	/*document.write('<script type="text/javascript" src="/html/online12334.php"></script>');*/
}
document.write('<script type="text/javascript" src="/html/online12334.php"></script>');

function zonKST(t){
	var zword=document.getElementById('chatcontent').value;
	if(zword=='在此输入可直接对话'){zword='';}
KS.openChatWin({cv:zword});
}




function swt_a() {
	//document.write("<script src='http://swt.whcondingpary.gitee.io/hmzx/pf.com/CheckInvitejs.aspx?id=TZL149310978'><\/script>");
}
function swt_b() {
	//document.write("<script src='http://swt.whcondingpary.gitee.io/hmzx/pf.com/CheckInvitejs.aspx?id=TZL149310978'><\/script>");
}


$(document).ready( function () {

	$("#right_bottom_span").click(function(){
		$("#right_bottom").hide(500);
		setTimeout(function(){$("#right_bottom").show(500)}, 10000);
	}); 
	
	$("#bottom_bottom_span").click(function(){
		$("#bottom_bottom").hide(500);
		setTimeout(function(){$("#bottom_bottom").show(500)}, 30000);
	}); 
	
	
    //setTimeout(openMswt(), 1e3);
	$(".swt_box").fadeIn(400, function() {
            $(this).show();
    });
	
	/*$(".mylike_close").click(function(){
		$(".mylike_box").hide(300);
		$("#dbswwwt").show(500);
	});*/
	
	
	var navsh = $('.ml_navs .nav1').height();
	var navsw = $('.ml_navs').width();
	var navheight = (navsh - 69) / 2;
	$('.ml_navs .item').css({ top: navheight });
	$('.ml_navs_news_box').css({ width: $(window).width() - navsw });
	$('.ml_navs_news').css({ width: $(window).width() - navsw });
	$('.ml_navs_news .device').css({ width: $(window).width() - navsw });
	$('.ml_navs_news .swiper-slide').css({ width: $(window).width() - navsw });
	//$('.ml_navs_news .swiper-slide img').css({ width: '' });	
$('.ico-home').click(function () {
	//出现导航和遮罩
	$(".ml_nav_screen").fadeIn();
	$('.ml_navs').css({ left: 0 });
	$('.ml_navs_news').css({ right: 0 });
});		
$(".backbtn").on('click', function () {
	/*clearTimeout(ml_nav_timer);*/
	$('.ml_navs').css({ left: '-2000px' });
	$('.ml_navs_news').css({ right: '-1815px' });
	$(".ml_nav_screen").fadeOut();
});	

	
	
    $('#main3_hot').FontScroll({time: 3000,num: 1});
	
	
//foot_top
	var li_n=$(".wap_navs_ul1 li").length;
	var li_h=parseInt($(".wap_navs_ul1 li img").width()*1.3);
	var li_p1=parseInt($(".wap_navs_ul1 li img").width()*0.2);
	var li_p2=parseInt($(".wap_navs_ul1 li img").width()*0.9);
	$(".wap_navs_ul1 li span").css({'line-height':$(".wap_navs_ul1 li img").width()+'px'});
	$(".wap_nav").click(function () {
		if($(".wap_navs_bg").hasClass("on")){
			for(var i=0;i<li_n;i++){
				var li_w=li_h*(i+1);
				$(".wap_navs_ul1 li").eq(i).css({top:"0px",opacity:"0"});
			}
			$(".wap_navs_bg").removeClass("on").hide();
			$(".wap_navs_ul2").removeClass("on").hide();
		}else{
			$(".wap_navs_bg").addClass("on").show();
			$(".wap_navs_ul1").show();
			for(var i=0;i<li_n;i++){
				var li_w=li_h*(i+1);
				if(i%2==0){
					//$(".navs_ul1 li").eq(i).css({'-webkit-transform':'translate('+li_p1+'px,-'+li_w+'px)','opacity':'1'});
					$(".wap_navs_ul1 li").eq(i).animate({left:+li_p1+'px',top:-li_w+'px',opacity:"1"},100);
				}else{
					//$(".navs_ul1 li").eq(i).css({'-webkit-transform':'translate('+li_p2+'px,-'+li_w+'px)','opacity':'1'});
					$(".wap_navs_ul1 li").eq(i).animate({left:+li_p2+'px',top:-li_w+'px',opacity:"1"},100);
				}
			}
		}
	});
	$(".wap_itemz").click(function(){
		if($(".wap_navs_ul2").hasClass("on")){
			$(this).siblings().css({'opacity':'1'});
			$(".wap_navs_ul2").removeClass("on").hide();
		}else{
			$(this).siblings().css({'opacity':'0.3'});
			$(".wap_navs_ul2").addClass("on").show();
		}
	});
	
	$('#weixin').click(function(){
		$('.wap_bgall').show();
		$('.wap_qrcode').show();
	});
	$(".wap_bgall").click(function(){
		$('.wap_bgall').hide();
		$('.wap_qrcode').hide();
	});
//foot_end

	 $(".main2_show").click(function(){
		   $(".main2_hide").show(500);
		  // $(".main2_hide").css({'display':'block'});
	 });


//导航焦点图
ban_swiper_dh = new Swiper('.swiper_dh', {
		direction : 'vertical',			
		pagination : '.pagination_dh',
		calculateHeight:true,
		loop:true,
		autoplay:3000,
		speed:500
	});



});
/*
if($("#header").length == 0){
$("body").append('<div class="ls01"></div>').append('<div class="ls02"></div>');
$(".ls01").load("/index.html #header",function(){$("body").prepend($(".ls01").html());$(".ls01").remove();});
$(".ls02").load("/index.html .navbox",function(){$("#header").after($(".ls02").html());$(".ls02").remove();});
}
*/

function GetRandomNum(Min, Max) {
    var Range = Max - Min;
    var Rand = Math.random();
    return Min + Math.round(Rand * Range);
}
var num = GetRandomNum(30, 60);


/*$("#header a").live("click",function(){
		var index = $(this).index();
		if($(this).hasClass("nav_cur")){
			$(this).removeClass("nav_cur");
			$(".navbox div").eq(index).hide("slow")
		}else{
			$(this).addClass("nav_cur").siblings().removeClass("nav_cur");
			$(".navbox div").eq(index).show("slow").siblings().hide("show");
		}
});*/



/*document.writeln("<link href=\"/swt/css/swt.css\" rel=\"stylesheet\" type=\"text/css\" /> ");
document.writeln("<div class=\"mylike_box\">");
document.writeln("<a href=\"javascript:void(0)\" onclick=\"onKST();\" title=\"在线咨询\"></a>");
document.writeln("<span class=\"mylike_close\"></span>");
document.writeln("</div>");*/


/*document.writeln("<script src=\"/js/onKST.js\" type=\"text/javascript\"><\/script>");
//document.writeln("<link href=\"/templets/symylike/css/swt.css\" rel=\"stylesheet\" type=\"text/css\" /> ");

//document.writeln("<div class=\"swt_box\"><span class=\"swt_close\"></span>");
//document.writeln("<div class=\"swt_bot1\"><a href=\"tel:4000275758\" title=\"电话咨询\"></a><a href=\"javascript:void(0)\" onclick=\"onKST();\" title=\"在线咨询\"></a></div>");
//document.writeln("</div>");

//document.writeln("<div id=\"right_bottom\"><a onclick=\"onKST_hongbao();\" href=\"javascript:void(0)\" title=\"点我咨询\"></a><span id=\"right_bottom_span\"></span><\/div>");

//document.writeln("<div id=\"bottom_bottom\"><div><a onclick=\"onKST_hongbao();\" href=\"javascript:void(0)\" title=\"点我咨询\"></a><span id=\"bottom_bottom_span\"></span><\/div><\/div>");*/




/*专题头部广告滑动开始*/
//document.writeln('<link rel="stylesheet" href="/css/idangerous.swiper.css">');
/*document.writeln('<script src="/js/idangerous.swiper-2.1.min.js"></script>');*/
//   window.addEventListener("DOMContentLoaded", function() {
//          var mySwiperquan = new Swiper('.swiper-containerquan',{
            /*pagination: '.paginationquan',
            paginationClickable: true,*/
//            slidesPerView: 3,
//            loop: true,
//            autoplay:3000,
//            calculateHeight:true
//          }) 
//});
/*专题头部广告滑动结束*/




function openMswt() {
    $(".swt_box").fadeIn(400, function() {
            $(this).show();
    });
}
function closeSwt() {
    $(".swt_box").fadeOut(400, function() {}).delay(17000).fadeIn(function() {
        openMswt();
    });
}
$(function() {
		   
    $(".swt_num").text(num);
    /*$(".swt_close").click(function(){
		//closeSwt();
		$(".swt_box").hide();
	});*/
	$(".link span").text(num);
	$(".swt_bot>a:eq(0)").css("background","#c269ac");
	$(".swt_bot>a:eq(1)").css("background","#890c84");
	$(".swt_box img").remove();

});




/*百度统计*/
var surl = window.location.host.split('.');
var u    = '';
for(var i in surl){
    var point = i < (surl.length - 1) ? '.' : '' ;
	if(i==0)
	{
		if(surl[0] != 'www')
		{
			u += surl[i]+point;
		}
	}
    if(i>0){
      u += surl[i]+point;
    }
}

function bd_hm(k) {
    var _hmt = _hmt || [];
    (function() {
        var hm = document.createElement("script");
        hm.src = "\/\/hm.baidu.com/hm.js?" + k + "";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
}

switch (u) {

    case 'm.whcondingpary.gitee.io/hmzx/.cn':
        bd_hm('8796092a6e86b828abd12d5c8a838592');
		swt_a();
        break;

    case 'whcondingpary.gitee.io/hmzx/.cn':
        bd_hm('02f82938378262ef6b3e407398d42a37');
        break;

    case 'm.whcondingpary.gitee.io/hmzx/s.com':
        bd_hm('ef8ffaa5611157b70a9fb713a3351fb3');
		swt_a();
        break;

    case 'whcondingpary.gitee.io/hmzx/s.com':
        bd_hm('ab9481bdc381d061cd771eddd41606cf');
        break;

    case 'm.whcondingpary.gitee.io/hmzx/pf.cn':
        bd_hm('ae4f7c4308ac8a7583a9bd61d3a93fbe');
		swt_a();
        break;

    case 'whcondingpary.gitee.io/hmzx/pf.cn':
        bd_hm('ae4f7c4308ac8a7583a9bd61d3a93fbe');
        break;

    case 'm.whcondingpary.gitee.io/hmzx/pf.com':
        bd_hm('39dd5a3d9d6f70243cb4c64267cfdfcd');
		swt_b();
        break;

    case 'whcondingpary.gitee.io/hmzx/pf.com':
        bd_hm('de061bdc445ef0b156e3406c96876a48');
        break;

    case 'm.condingpary.gitee.io/hmzx/yk.com':
        bd_hm('e7de71c9f61773967b674d773ea07c6a');
        break;

    case 'condingpary.gitee.io/hmzx/yk.com':
        bd_hm('8f38a1b5f6cae64b74742cd02574e4ef');
        break;

     case 'm.condingpary.gitee.io/hmzx/027.com':
        bd_hm('2b0f1f746910b37bccdeb4d2e8d033a4');
        break;
    default:
	    swt_a();
}










    /*top tips  头部微信*/
	document.writeln("<link href=\"/2017/kst/css/swt.css\" rel=\"stylesheet\" type=\"text/css\" /> ");
    $("body").append("<div class='top_tips' onClick=\"#\"><img src='/images/tips.gif' style='width:35px!important;margin:5px 5px 0 5px' /><ul><li>您好:</li><li>禾美21周年庆，爆品秒杀，8重豪礼相送!</li></ul></div>");

    function mp() {
        $(".top_tips").animate({
            top: "-80px"
        }, 1000, function() {
            setTimeout("mb()", 15000);
        });
		$("#fixtop").animate({
            height: "0px"
        }, 1000);
    }

    function mb() {
        $(".top_tips").animate({
            top: "0px"
        }, 1000, function() {
            setTimeout("mp()", 10000);
        });
		$("#fixtop").animate({
            height: "50px"
        }, 1000);
    }

    mb();